package mysql

import "gorm.io/gorm"

type Order struct {
	gorm.Model
	Payment int8    `gorm:"type:tinyint;default:0"`
	Status  int8    `gorm:"type:tinyint;default:0"`
	Amount  float64 `gorm:"type:float(10,2)"`
	OrderSn string  `gorm:"type:char(36)"`
	UserId  int8    `gorm:"type:tinyint(1)"`
}

func (o *Order) Create() error {
	return db.Create(&o).Error
}
